<!--模态框-->
<!--模态框-未受理详情-->
<div class="modal-dialog">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close" ms-click="setDeleteFlag"><span
                    aria-hidden="true">&times;</span></button>
            <!--详情-->
            <h4 class="modal-title" ms-if="!isCancel"><b>红色联想Y-40-70</b></h4>

            <!--取消原因-->
            <h4 class="modal-title" ms-if="isCancel">取消工单</h4>
        </div>

        <!--详情-->
        <div class="modal-body modal-info-content" ms-if="!isCancel">
            <p>
                <span>{{order.Model}}</span>
                &nbsp;&nbsp;&nbsp;&nbsp;
                <span>{{order.Contact}}</span>
                &nbsp;&nbsp;&nbsp;&nbsp;
                <span>{{order.Phone}}</span>
            </p>

            <p>
                <label>地址:</label>
                &nbsp;&nbsp;&nbsp;&nbsp;
                <span>{{order.Address}}</span>
                &nbsp;&nbsp;&nbsp;&nbsp;
            </p>

            <div style="margin-top: 10px; margin-bottom: 12px">
                <label>重要配件:</label>
                <br/>

                <div class="row">
                    <div class="col-sm-4" ms-repeat="Accessories">
                        <span>{{el.Name}};{{el.Model}};{{el.Number}}</span>
                    </div>
                </div>
            </div>

            <p>
                <label>故障描述:</label>
                &nbsp;&nbsp;&nbsp;&nbsp;
                <span>{{order.Phenomenon}}</span>
            </p>

            <p>
                <label>备注:</label>
                &nbsp;&nbsp;&nbsp;&nbsp;
                <span>{{order.Memo}}</span>
            </p>

            <p>
                <label>表单状态：</label>
            </p>

            <!--未受理详情-->
            <div class="modal-form" ms-if="modelActive == 1">
                <p>维修单编号：{{order.OrderID}}</p>

                <p><span>创建时间：{{CTime}}</span><span>未受理</span></p>
            </div>

            <!--受理中详情-->
            <div class="modal-form" ms-if="modelActive == 2">
                <p>维修单编号：{{order.OrderID}}</p>

                <p><span>创建时间：{{CTime}}</span><span>未受理</span></p>

                <p><span>受理时间：{{order.T2.date}}
                </span><span>受理中</span></p>

                <!--<p><span>受理时间：2015-02-23</span><span>受理中</span></p>-->
                <!--<input class="modal-form-agent" type="text" placeholder="请填写受理人姓名"/>-->
            </div>

            <!--诊断中详情-->
            <div class="modal-form-large" ms-if="modelActive == 3">
                <table>
                    <tr>
                        <td>维修单编号：{{order.OrderID}}</td>
                    </tr>
                    <tr>
                        <td><span>创建时间：{{CTime}}</span><span>未受理</span></td>
                    </tr>
                    <tr>
                        <td><span>受理时间：{{GTime}}</span><span>已受理</span><span>受理人：{{GMan}}</span></td>
                    </tr>
                    <tr>
                        <td>
                            <p>诊断开始时间：{{order.T3.date}}<span class="nbsp">诊断中</span></p>

                            <div class="row">
                                <div class="col-sm-10">
                                    <input type="text" class="form-control modal-form-agent" ms-duplex="Content"
                                           placeholder="请填写诊断人结果"/>
                                </div>
                                <!--<div class="col-sm-4">-->
                                <!--<input type="text" class="form-control modal-form-agent" ms-duplex="username"-->
                                <!--placeholder="请填写诊断人姓名"/>-->
                                <!--</div>-->
                                <div class="col-sm-2">
                                    <button class="btn btn-success" ms-click="addLog(order.OrderID,modelActive,2)">添加
                                    </button>
                                </div>
                            </div>
                            <br/>

                            <P>诊断结果</P>
                            <!--面板-->
                            <div class="row" ms-repeat="DArray">
                                <div class="col-sm-10">
                                    <div class="panel panel-default" ms-if="el.Content!=''">
                                        <div class="panel-body">
                                            {{el.Content}}
                                            <div class="text-right">---诊断人：{{el.UID[1]}}</div>
                                        </div>
                                    </div>
                                </div>

                                <!--<div class="col-sm-2">-->
                                <!--<button class="btn btn-danger" ms-click="delDiagnose($index)">删除</button>-->
                                <!--</div>-->
                            </div>
                        </td>
                    </tr>
                </table>
            </div>

            <!--维修中详情-->
            <div class="modal-form-large" ms-if="modelActive==4">
                <table>
                    <tr>
                        <td>维修单编号：{{order.OrderID}}</td>
                    </tr>
                    <tr>
                        <td><span>创建时间：{{CTime}}</span><span>未受理</span></td>
                    </tr>
                    <tr>
                        <td><span>受理时间：{{order.T2.date}}</span><span>已受理</span><span>受理人：{{GMan}}</span></td>
                    </tr>
                    <tr>
                        <td><p>诊断开始时间：{{order.T3.date}}<span class="nbsp">诊断中</span><!--诊断人：张树荣-->
                        </p>

                            <p>诊断结果：</p>

                            <div class="panel panel-default" ms-repeat="DArray">
                                <div class="panel-body">
                                    {{el.Content}}
                                    <div class="text-right">
                                        ---诊断人：{{el.UID[1]}}
                                    </div>
                                </div>
                            </div>

                        </td>
                    </tr>

                    <tr>
                        <td>
                            <p>维修开始时间：{{order.T4.date}}<span class="nbsp">维修中</span></p>

                            <div class="row">
                                <div class="col-sm-10">
                                    <input class="form-control modal-form-agent" type="text" placeholder="请填写维修结果"
                                           ms-duplex="Content"/>
                                </div>
                                <div class="col-sm-2">
                                    <button class="btn btn-success" ms-click="addLog(order.OrderID,modelActive,2)">添加
                                    </button>
                                </div>
                            </div>
                            <br/>

                            <div class="row" ms-repeat="FArray">
                                <div class="col-sm-10">
                                    <div class="panel panel-default" ms-is="el.Content!=null">
                                        <div class="panel-body">
                                            {{el.Content}}
                                            <div class="text-right">---维修人：{{el.UID[1]}}</div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>

            <!--测试中详情-->
            <div class="modal-form-large" ms-if="modelActive==5">
                <table>
                    <tr>
                        <td>维修单编号：{{order.OrderID}}</td>
                    </tr>
                    <tr>
                        <td><span>创建时间：{{CTime}}</span><span>未受理</span></td>
                    </tr>
                    <tr>
                        <td><span>受理时间：{{order.T2.date}}</span><span>已受理</span><span>受理人：{{GMan}}</span></td>
                    </tr>
                    <tr>
                        <td><p>诊断开始时间：{{order.T3.date}}<span class="nbsp">诊断中</span><!--诊断人：张树荣-->
                        </p>

                            <p>诊断结果：</p>

                            <div class="panel panel-default" ms-repeat="DArray">
                                <div class="panel-body">
                                    {{el.Content}}
                                    <div class="text-right">
                                        ---诊断人：{{el.UID[1]}}
                                    </div>
                                </div>
                            </div>

                        </td>
                    </tr>
                    <!--测试 维修部分-->
                    <tr>
                        <td>
                            <p>维修开始时间：{{order.T4.date}}<span class="nbsp">维修中</span></p>

                            <p>维修处理方法：</p>
                            <div class="row" ms-repeat="FArray">
                                <div class="col-sm-12">
                                    <div class="panel panel-default">
                                        <div class="panel-body">
                                            {{el.Content}}
                                            <div class="text-right">---维修人：{{el.UID[1]}}</div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                        </td>
                    </tr>

                    <!--测试 测试部分-->
                    <tr>
                        <td>
                            <p>测试开始时间：{{order.T5.date}}<span class="nbsp">测试中</span></p>

                            <p>测试结果：</p>

                            <div class="row">
                                <div class="col-sm-10">
                                    <input type="text" class="form-control modal-form-agent" placeholder="请填写诊断人结果" ms-duplex="Content"/>
                                </div>
                                <!--<div class="col-sm-4">-->
                                    <!--<input type="text" class="form-control modal-form-agent" placeholder="请填写诊断人姓名"/>-->
                                <!--</div>-->
                                <div class="col-sm-2">
                                    <button class="btn btn-success" ms-click="addLog(order.OrderID,modelActive,2)">添加</button>
                                </div>
                            </div>

                            <!--测试 诊断部分-->
                            <br/>

                            <p>测试结果：</p>

                            <div class="row">
                                <div class="col-sm-10">
                                    <div class="panel panel-default" ms-repeat="TArray">
                                        <div class="panel-body">
                                            {{el.Content}}
                                            <div class="text-right">---测试人：{{el.UID[1]}}</div>
                                        </div>
                                    </div>
                                </div>

                                <!--<div class="col-sm-2">-->
                                    <!--<button class="btn btn-danger">删除</button>-->
                                <!--</div>-->
                            </div>

                            <!--<div class="row">-->
                                <!--<div class="col-sm-10">-->
                                    <!--<div class="panel panel-default">-->
                                        <!--<div class="panel-body">-->
                                            <!--摄像头坏了需要更换-->
                                            <!--<div class="text-right">---诊断人：伏仲</div>-->
                                        <!--</div>-->
                                    <!--</div>-->
                                <!--</div>-->

                                <!--<div class="col-sm-2">-->
                                    <!--<button class="btn btn-danger">删除</button>-->
                                <!--</div>-->
                            <!--</div>-->

                        </td>
                    </tr>
                </table>
            </div>
            <!--等待交付-->
            <div class="modal-form-large" ms-if="modelActive==6">
                <table>
                    <tr>
                        <td>维修单编号：{{order.OrderID}}</td>
                    </tr>
                    <tr>
                        <td><span>创建时间：{{CTime}}</span><span>未受理</span></td>
                    </tr>
                    <tr>
                        <td><span>受理时间：{{order.T2.date}}</span><span>已受理</span><span>受理人：{{GMan}}</span></td>
                    </tr>
                    <tr>
                        <td><p>诊断开始时间：{{order.T3.date}}<span class="nbsp">诊断中</span><!--诊断人：张树荣-->
                        </p>

                            <p>诊断结果：</p>

                            <div class="panel panel-default" ms-repeat="DArray">
                                <div class="panel-body">
                                    {{el.Content}}
                                    <div class="text-right">
                                        ---诊断人：{{el.UID[1]}}
                                    </div>
                                </div>
                            </div>

                        </td>
                    </tr>
                    <!--测试 维修部分-->
                    <tr>
                        <td>
                            <p>维修开始时间：{{order.T4.date}}<span class="nbsp">维修中</span></p>

                            <p>维修处理方法：</p>
                            <div class="row" ms-repeat="FArray">
                                <div class="col-sm-12">
                                    <div class="panel panel-default" ms-is="el.Content!=null">
                                        <div class="panel-body">
                                            {{el.Content}}
                                            <div class="text-right">---维修人：{{el.UID[1]}}</div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                        </td>
                    </tr>
                    <!--等待交付 测试开始-->
                    <tr>
                        <td>
                            <p>测试开始时间：{{order.T5.date}}<span class="nbsp">测试中</span></p>

                            <p>测试结果：</p>

                            <div class="panel panel-default" ms-repeat="TArray">
                                <div class="panel-body">
                                    {{el.Content}}
                                    <div class="text-right">
                                        ---测试人：{{el.UID[1]}}
                                    </div>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <!--等带交付 测试完成-->
                    <tr>
                        <td>
                            <p>测试完成时间：{{order.T6.date}}<span class="nbsp">等待交付</span></p>
                            <input type="text" class="modal-form-agent" placeholder="请填写交付人姓名" ms-duplex="Content"/>
                            <br/>
                            <br/>
                        </td>
                    </tr>
                </table>
            </div>

            <!--已完成详情-->
                <span class="modal-form-up" ms-if="modelActive==7">
                    已完成
                </span>

            <!--已取消详情-->
                <span class="modal-form-up" ms-if="modelActive==8">
                    已完成
                </span>

        </div>


        <!--取消原因-->
        <div class="modal-body modal-info-content" ms-if="isCancel">
            <h5><b>取消原因：</b></h5>
            <textarea class="form-control" rows="2" onscroll="this.rows++" ms-duplex="Content"></textarea>
        </div>

        <br/>

        <!--详情-->
        <div align="center" class="modal-info-footer" ms-if="!isCancel">
            <button type="button" class="btn btn-danger" ms-if="modelActive != 8"
                    ms-click="addLog(order.OrderID,modelActive-1,0)">返回上一个步骤
            </button>
            &nbsp;&nbsp;&nbsp;&nbsp;
            <button type="button" class="btn btn-danger" ms-if="modelActive != 8" ms-click="showCancel" >取消工单</button>
            &nbsp;&nbsp;&nbsp;&nbsp;
            <button ms-if="modelActive<7" type="button" class="btn btn-primary" ms-click="addLog(order.OrderID,modelActive+1,1)">{{keyValue}}
            </button>
            &nbsp;&nbsp;&nbsp;&nbsp;
            <button ms-if="modelActive==7" type="button" class="btn btn-primary" ms-click="addLog(order.OrderID,7,1)">{{keyValue}}
            </button>
            <button ms-if="modelActive==8" type="button" class="btn btn-primary" ms-click="addLog(order.OrderID,1,1)">{{keyValue}}
            </button>
        </div>

        <!--取消原因-->
        <div align="center" class="modal-info-footer" ms-if="isCancel">
            <button type="button" class="btn btn-default" ms-click="addLog(order.OrderID,8,1)">确定</button>
            &nbsp;&nbsp;&nbsp;&nbsp;
            <button type="button" class="btn btn-primary" ms-click="showInfo" data-dismiss="modal">取消</button>
        </div>

    </div>
    <!-- /.modal-content  -->
</div><!-- /.modal-dialog -->
